<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Dashboard">
    <meta name="keyword" content="Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">

    <title>行驶证管理</title>
    <!-- Bootstrap core CSS -->
    <link rel="shortcut icon" href="newtemplatesfiles5/img/favicon.html">
    <link href="newtemplatesfiles5/css/bootstrap.min.css" rel="stylesheet">
    <link href="newtemplatesfiles5/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="newtemplatesfiles5/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <link href="newtemplatesfiles5/assets/jquery-easy-pie-chart/jquery.easy-pie-chart.css" rel="stylesheet" type="text/css" media="screen"/>
    <link rel="stylesheet" href="newtemplatesfiles5/css/owl.carousel.css" type="text/css">
    <!-- Custom styles for this template -->
    <link href="newtemplatesfiles5/css/style.css" rel="stylesheet">
    <link href="newtemplatesfiles5/css/style-responsive.css" rel="stylesheet" />

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
    <script src="newtemplatesfiles5/js/html5shiv.js"></script>
    <script src="newtemplatesfiles5/js/respond.min.js"></script>
    <![endif]-->

</head>

<body>

<section id="container" >
    <!--header start-->
    <div th:insert="common/admin-common-header::top"></div>
    <!--header end-->
    <!--sidebar start-->
    <div th:insert="common/admin-common-sidebar::#left"></div>
    <!--sidebar end-->
    <section id="main-content">
        <section class="wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel">
                        <header class="panel-heading">
                            所有行驶证信息
                        </header>
                        <table class="table table-striped border-top" id="sample_1">
                            <thead>
                            <tr>
                                <th>行驶证号</th>
                                <th>电动车牌号</th>
                                <th class="hidden-phone">生效时间</th>
                                <th class="hidden-phone">姓名</th>
                                <th class="hidden-phone">学号</th>
                                <th class="hidden-phone">状态</th>
                                <th class="hidden-phone">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr class="odd gradeX" th:each="emp:${session.adminAllDL}">
                                <td th:text="${emp.drivingLicenseID}"></td>
                                <td th:text="${emp.ebickID}"></td>
                                <td th:text="${emp.generateTime}"></td>
                                <td class="hidden-phone" th:text="${emp.studentName}"></td>
                                <td class="hidden-phone" th:text="${emp.studentID}"></td>
                                <td class="hidden-phone" th:text="${emp.status}"></td>
                                <td class="hidden-phone" th:text="1"></td>
                            </tr>

                            </tbody>
                        </table>
                    </div><!-- /content-panel -->
                </div><!-- /col-lg-4 -->
            </div><!-- /row -->



        </section>
    </section><!-- /MAIN CONTENT -->

    <!--main content end-->
</section>
<!-- js placed at the end of the document so the pages load faster -->
<script src="newtemplatesfiles5/js/jquery.js"></script>
<script src="newtemplatesfiles5/js/jquery-1.8.3.min.js"></script>
<script src="newtemplatesfiles5/js/bootstrap.min.js"></script>
<script src="newtemplatesfiles5/js/jquery.scrollTo.min.js"></script>
<script src="newtemplatesfiles5/js/jquery.nicescroll.js" type="text/javascript"></script>
<script src="newtemplatesfiles5/js/jquery.sparkline.js" type="text/javascript"></script>
<script src="newtemplatesfiles5/assets/jquery-easy-pie-chart/jquery.easy-pie-chart.js"></script>
<script src="newtemplatesfiles5/js/owl.carousel.js" ></script>
<script src="newtemplatesfiles5/js/jquery.customSelect.min.js" ></script>
<script src="newtemplatesfiles5/assets/jquery-knob/js/jquery.knob.js"></script>
<!--script type="text/javascript" src="newtemplatesfiles5/assets/data-tables/jquery.dataTables.js"></script>
<script type="text/javascript" src="newtemplatesfiles5/assets/data-tables/DT_bootstrap.js"></script-->



<!--common script for all pages-->
<script src="newtemplatesfiles5/js/common-scripts.js"></script>

<!--script for this page-->
<!--script src="newtemplatesfiles5/js/dynamic-table.js"></script-->
<link rel="stylesheet" type="text/css" href="http://cdn.datatables.net/1.11.5/css/jquery.dataTables.min.css">
<script type="text/javascript" src="http://cdn.datatables.net/1.11.5/js/jquery.dataTables.min.js"></script>
<script>
    $(document).ready(function(){
        var table = $("#sample_1").DataTable({
            "oLanguage": {
                "sSearch": "查询:",
            },
            "aLengthMenu": [5, 10, 25, 50,100],
            "language": {
                "lengthMenu": "每页展示 _MENU_ 条记录",
                "zeroRecords": "发现 0 条记录",
                "info": "第 _PAGE_ 页   共 _PAGES_ 页",
                "infoEmpty": "找到 0 记录",
                "infoFiltered": "(共 _MAX_ 条记录)",
                "oPaginate": {
                    "sPrevious": "上一页",
                    "sNext": "下一页"
                }
            },
            //"ajax": "data/arrays.txt",
            "columnDefs": [ {
                "targets": -1,
                "data": null,
                "defaultContent": "<button class='btn btn-danger'>详情</button>"
            } ]
        });
        $('#sample_1 tbody').on( 'click', 'button', function () {
            var data = table.row( $(this).parents('tr') ).data();
            //alert("确定删除吗？");
            console.log(data);

            var form = new FormData();
            form.append("DLID",data[0]);

            $.ajax({
                url:"admin-getOneDL.do",
                type:"post",
                dataType:"html",
                data:form,
                cache:false,
                processData:false,
                contentType:false,
                success: function (data) {
                    if(data == "success"){
                        location.href="admin-adminOneDL";
                    }else{
                        alert(data);
                    }
                },
                error:function (data) {
                    alert("查询失败");
                }
            })
        } );
    });

    $(".knob").knob();
</script>


</body>
</html>
